Method to efficiently and reliably process ordered user account events in a cluster

ABSTRACT

A method, apparatus, and computer program product uses a SELECT FOR UPDATE, to pick up events from a TARGET_EVENT table. Selected events are reserved for processing by a cluster node which triggers a query. PICKUP_TIME and SERVER_ID values are inserted for each of the events picked from the TARGET_EVENT table. The events are grouped by TARGET and UID while preserving a relative order in an overall event sequence. A group of events is then submitted for processing.

BACKGROUND 1. Field

A method, apparatus, and computer-program product that relates generallyto sequential processing of account events on multiple useridentifications (IDs) and remote targets at the same time. Morespecifically, account events are processed using a cluster awaretarget-UID (target user identification) locking mechanism.

2. Description of the Related Art

In provisioning solutions, such as IBM Security Identity Governance andIntelligence (IGI), a large number of user accounts may be provisionedto remote targets. Subsequently, the same accounts may be automaticallyupdated and/or deleted depending on the state of access policies withinthe system. The number of such account operations may be higher whenthey are triggered from an identity management system throughdynamically evaluated access policies. Therefore, executing entiregroups of account events in parallel, on different remote targets,offers optimal turn-around times for end users and the best overallscalability of the system.

There are many target types on which groups of account events may beexecuted in parallel. Each target type may have a different way ofstoring user authentication and authorization information. For example,remote targets may store account information in specific files on thefile system. During updates, input/output (I/O) access to the specificfiles may be serialized to avoid data inconsistency. Other target typesmay store their user account information in databases to allow safeconcurrent updates.

To guarantee a correct order of event processing, systems such as IGI,address the asynchronous account store access limitations imposed bymany different target types. In order to address the many asynchronousaccount store access limitations uniformly and efficiently across alltarget types, it may be advantageous to keep track of unique target-UIDUID (target user identification) combinations that are currentlyselected for account updates. However, target access complexityincreases when multiple nodes in an application cluster are deployed toprocess target events. Therefore, a process to keep track of uniquetarget-UID (target user identification) combinations must also scalewell in the application cluster.

Synchronized target access may be achieved by allowing only one node inthe cluster to process all account events, one at the time, in sequence.However, allowing only one node at the time to process all accountevents in a cluster is not efficient. Another synchronized target accessmay be achieved by synchronizing account event processing at the targetlevel, and processing all account events on that target in sequence.Many targets, such as those using databases for user repositories, allowfor safe concurrent operations on more than one account at the sametime. The entire target may be locked to process an update on any givenaccount. However, this process is also inefficient.

A need exists for an improved method, apparatus, and computer programproduct to sequentially process account events on multiple user IDs andremote targets at the same time.

SUMMARY

According to one illustrative embodiment, a computer-implemented methoduses a SELECT FOR UPDATE, to pick up events from a TARGET_EVENT table.Selected events are reserved for processing by a cluster node whichtriggers a query. PICKUP_TIME and SERVER_ID values are inserted for eachof the events picked from the TARGET_EVENT table. The events are groupedby TARGET and UID while preserving a relative order in an overall eventsequence. A group of events is then submitted for processing.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a pictorial representation of a network of data processingsystems in which an illustrative embodiment may be implemented;

FIG. 2 is a diagram of a data processing system in which an illustrativeembodiment may be implemented;

FIG. 3 is a schematic diagram illustrating a configuration to processevents at remote targets in accordance with an illustrative embodiment;

FIG. 4 is a schematic diagram illustrating a configuration forimplementing an event queue in accordance with an illustrativeembodiment;

FIG. 5 is a flowchart illustrating a process for picking up events froma target event table in accordance with an illustrative embodiment;

FIG. 6 is a flowchart illustrating a reset process for in accordancewith an illustrative embodiment;

FIG. 7 is a flowchart illustrating a processing sequence of an event inaccordance with an illustrative embodiment;

FIG. 8 is a flowchart illustrating a remote target processor inaccordance with an illustrative embodiment;

FIG. 9 is a flowchart illustrating a process for a remote targetprocessor to process a request in accordance with an illustrativeembodiment;

FIG. 10 is a flowchart illustrating a process for an event retrysequence in accordance with an illustrative embodiment;

FIG. 11 is a flowchart illustrating a process for dealing with an eventprocessing node that goes down in accordance with an illustrativeembodiment;

FIG. 12 is a flowchart illustrating a retry process in accordance withan illustrative embodiment; and

FIG. 13 is a flowchart illustrating an event-retry process in accordancewith an illustrative embodiment.

DETAILED DESCRIPTION

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include acomputer-readable storage medium or media having computer-readableprogram instructions thereon for causing a processor to carry outaspects of the present invention.

The computer-readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer-readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of thedevices. A non-exhaustive list of more specific examples ofcomputer-readable storage medium include the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device, such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, or any other suitable combination of the foregoingdevices. A computer-readable storage medium, as used herein, is not tobe construed as being transitory signals per se, such as radio waves orother freely propagating electromagnetic waves, electromagnetic wavespropagating through a waveguide or other transmission media (e.g., lightpulses passing through a fiber-optic cable), or electrical signalstransmitted through a wire.

Computer-readable program instructions described herein can bedownloaded to respective computing/processing devices from acomputer-readable storage medium, or to an external computer or externalstorage device via a network, for example, the Internet, a local areanetwork, a wide area network and/or a wireless network. The network maycomprise copper transmission cables, optical transmission fibers,wireless transmissions, routers, firewalls, switches, gateway computersand/or edge servers. A network adapter card or network interface in eachcomputing/processing device receives computer-readable programinstructions from the network and forwards the computer-readable programinstructions for storage in a computer-readable storage medium withinthe respective computing/processing device.

Computer-readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. Thecomputer-readable program instructions may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer, for example, through the Internet using an Internet serviceprovider. In some embodiments, electronic circuitry including, forexample, programmable logic circuitry, field-programmable gate arrays(FPGA), or programmable logic arrays (PLA), may execute thecomputer-readable program instructions by utilizing state information ofthe computer-readable program instructions to personalize the electroniccircuitry, in order to perform aspects of the present invention.

Aspects of the present invention are described below with reference tothe flowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to the embodiments ofthe present invention. It will be understood that each block of theflowchart illustrations and/or block diagrams, or combinations of blocksin the flowchart illustrations and/or block diagrams, can be implementedby computer-readable program instructions.

These computer program instructions may be provided to a processor of ageneral purpose computer, special purpose computer, or otherprogrammable data processing apparatus to produce a machine, such thatthe instructions, which execute via the processor of the computer orother programmable data processing apparatus, create means forimplementing the functions or acts specified in the flowchart and/orblock diagram block or blocks. These computer program instructions mayalso be stored in a computer-readable medium that can direct a computer,other programmable data processing apparatus, or other devices, tofunction in a particular manner, such that the instructions stored inthe computer-readable medium produce an article of manufacture includinginstructions which implement the function or act specified in theflowchart and/or block diagram block or blocks.

The computer-readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device, to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions or acts specified in the flowchart and/or block diagram blockor blocks.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, a segment, or aportion of instructions, which comprises one or more executableinstructions for implementing the specified logical function orfunctions. In some alternative implementations, the functions noted inthe block may occur out of the order noted in the figures. For example,two blocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It should also benoted that each block of the block diagrams and/or flowchartillustration, or combinations of blocks in the block diagrams and/orflowchart illustration, can be implemented by special purposehardware-based systems that perform the specified functions or acts, orcarry out combinations of special purpose hardware and computerinstructions.

With reference now to the figures, and in particular, with reference toFIGS. 1-3, diagrams of data processing environments are provided inwhich illustrative embodiments may be implemented. It should beappreciated that FIGS. 1-3 are only meant as examples, and are notintended to assert or imply any limitation with regard to theenvironments in which different embodiments may be implemented. Manymodifications to the depicted environments may be made.

FIG. 1 depicts a pictorial representation of a network of dataprocessing systems in which illustrative embodiments may be implemented.Network data processing system 100 is a network of computers and otherdevices in which the illustrative embodiments may be implemented.Network data processing system 100 contains network 102, which is themedium used to provide communications links between the computers andthe other devices connected together within network data processingsystem 100. Network 102 may include connections, such as, for example,wired communication links, wireless communication links, or fiber opticcables.

In the depicted example, server 104 and server 106 connect to network102, along with storage 108. Server 104 and server 106 may be, forexample, server computers with high-speed connections to network 102. Inaddition, server 104 or server 106 may, for example, manage recovery ofa customer workload after failure of a primary computing environmentexecuting the customer workload. The failed primary computingenvironment may be, for example, a server or a set of servers in a datacenter environment or a cloud environment. Server 104 or server 106 alsomay generate a secondary virtual machine seed image storage at asecondary data processing site for the failure recovery. Theconfiguration of the secondary data processing site is similar to theconfiguration of the primary data processing site.

Client 110, client 112, and client 114 also connect to network 102.Clients 110, 112, and 114 are clients of server 104 and/or server 106.Server 104 and server 106 may provide information, such as boot files,operating system images, virtual machine images, or softwareapplications to clients 110, 112, and 114.

In this example, clients 110, 112, and 114 may each represent adifferent computing environment. A computing environment includesphysical and software resources used to execute a set of one or morecustomer workloads or tasks. A computing environment may comprise, forexample, one server, a rack of servers, a cluster of servers, such as adata center, a cloud of computers, such as a private cloud, a publiccloud, or a hybrid cloud, or any combination thereof. In addition, eachof clients 110, 112, and 114 may be a primary data processing site or asecondary data processing site. A primary data processing site initiallyexecutes a customer workload using a set of primary virtual machines andimages. A secondary data processing site executes the customer workloadusing a set of secondary virtual machines and seed images when one ormore primary virtual machines fail while processing the customerworkload at the primary data processing site.

Storage 108 is a network storage device capable of storing any type ofdata in a structured format or an unstructured format. The type of datastored in storage 108 may be, for example, a list of computingenvironments with corresponding available resources, a list of primarydata processing sites, a list of secondary data processing sites, a listof customer workloads, a plurality of virtual machine images, or othersuitable types of data. Further, storage 108 may store other types ofdata, such as authentication data or credential data, that may includeuser names, passwords, and biometric data associated with systemadministrators, for example.

In addition, it should be noted that network data processing system 100may include any number of additional servers, clients, storage devices,and other devices not shown. Program code located in network dataprocessing system 100 may be stored on a computer-readable storagemedium and downloaded to a computer or other data processing device foruse. For example, program code may be stored on a computer-readablestorage medium on server 104 and downloaded to client 110 over network102 for use by client 110.

In the depicted example, network data processing system 100 may beimplemented as a number of different types of communication networks,such as, for example, an internet, an intranet, a local area network(LAN), and a wide area network (WAN). FIG. 1 is intended as an exampleonly, and not as an architectural limitation for the differentillustrative embodiments.

With reference now to FIG. 2, a diagram of a data processing system isdepicted in accordance with an illustrative embodiment. Data processingsystem 200 is an example of a computer, such as server 104 in FIG. 1, inwhich computer-readable program code or instructions for implementingprocesses of the illustrative embodiments may be located. In thisillustrative example, data processing system 200 includes communicationsfabric 202, which provides communications between processor unit 204,memory 206, persistent storage 208, communications unit 210,input/output unit 212, and display 214.

Processor unit 204 serves to execute instructions for softwareapplications and programs that may be loaded into memory 206. Processorunit 204 may be a set of one or more hardware processor devices, or maybe a multi-processor core, depending on the particular implementation.Further, processor unit 204 may be implemented using one or moreheterogeneous processor systems, in which a main processor is presentwith secondary processors on a single chip. As another illustrativeexample, processor unit 204 may be a symmetric multi-processor systemcontaining multiple processors of the same type.

Memory 206 and persistent storage 208 are examples of storage devices216. A computer-readable storage device is any piece of hardware that iscapable of storing information, such as, for example, withoutlimitation, data, computer-readable program code in functional form,and/or other suitable types of information either on a transient basisand/or a persistent basis. Further, a computer-readable storage deviceexcludes a propagation medium. Memory 206, in these examples, may be,for example, a random access memory, or any other suitable volatile ornon-volatile storage device. Persistent storage 208 may take variousforms, depending on the particular implementation. For example,persistent storage 208 may contain one or more devices. For example,persistent storage 208 may be a hard drive, a flash memory, a rewritableoptical disk, a rewritable magnetic tape, or some other combination ofthe above mentioned devices. The media used by persistent storage 208may be removable. For example, a removable hard drive may be used forpersistent storage 208.

In this example, persistent storage 208 stores programs 220 and data240. Programs 220 may include event monitor 230 and remote target broker232. Data 240 may include target event table 243, target UID lock table245, and retry thresholds 247.

Communications unit 210, in this example, provides for communicationwith other computers, data processing systems, and devices via anetwork, such as network 102 in FIG. 1. Communications unit 210 mayprovide communications through the use of both physical and wirelesscommunications links. The physical communications link may utilize, forexample, a wire, a cable, a universal serial bus, or any other type ofphysical technology to establish a physical communications link for dataprocessing system 200. The wireless communications link may utilize, forexample, shortwave, high frequency, ultra high frequency, microwave,wireless fidelity (Wi-Fi), bluetooth technology, global system formobile communications (GSM), code division multiple access (CDMA),second-generation (2G), third-generation (3G), fourth-generation (4G),4G Long Term Evolution (LTE), LTE Advanced, or any other type ofwireless communication technology, or standard to establish a wirelesscommunications link for data processing system 200.

Input/output unit 212 allows for the input and output of data with otherdevices that may be connected to data processing system 200. Forexample, input/output unit 212 may provide a connection for user inputthrough a keypad, a keyboard, a mouse, and/or some other suitable typeof input device. Display 214 provides a mechanism to display informationto a user and may include touch screen capabilities to allow the user tomake on-screen selections through user interfaces or input data, forexample.

Instructions for the operating system, applications, and/or programs maybe located in storage devices 216, which are in communication withprocessor unit 204 through communications fabric 202. In thisillustrative example, the instructions are in a functional form onpersistent storage 208. These instructions may be loaded into memory 206for running by processor unit 204. The processes of the differentembodiments may be performed by processor unit 204 usingcomputer-implemented instructions, which may be located in a memory,such as memory 206. These program instructions are referred to asprogram code, computer-usable program code, or computer-readable programcode that may be read and run by a processor in processor unit 204. Theprogram instructions, in the different embodiments, may be embodied ondifferent physical computer-readable storage devices, such as memory 206or persistent storage 208.

Program code 242 is located in a functional form on computer-readablemedia 244 that is selectively removable, and may be loaded onto ortransferred to data processing system 200 for running by processor unit204. Program code 242 and computer-readable media 244 form computerprogram product 246. In one example, computer-readable media 244 may becomputer-readable storage media 248 or computer-readable signal media250. Computer-readable storage media 248 may include, for example, anoptical or magnetic disc that is inserted or placed into a drive orother device that is part of persistent storage 208 for transfer onto astorage device, such as a hard drive, that is part of persistent storage208. Computer-readable storage media 248 also may take the form of apersistent storage, such as a hard drive, a thumb drive, or a flashmemory drive that is connected to data processing system 200. In someinstances, computer-readable storage media 248 may not be removable fromdata processing system 200.

Alternatively, program code 242 may be transferred to data processingsystem 200 using computer-readable signal media 250. Computer-readablesignal media 250 may be, for example, a propagated data signalcontaining program code 242. For example, computer-readable signal media250 may be an electro-magnetic signal, an optical signal, and/or anyother suitable type of signal. These signals may be transmitted overcommunication links, such as wireless communication links, an opticalfiber cable, a coaxial cable, a wire, and/or any other suitable type ofcommunications link. In other words, the communications link and/or theconnection may be physical or wireless in the illustrative examples. Thecomputer-readable media also may take the form of non-tangible media,such as communication links or wireless transmissions containing theprogram code.

In some illustrative embodiments, program code 242 may be downloadedover a network to persistent storage 208 from another device or dataprocessing system through computer-readable signal media 250 for usewithin data processing system 200. For instance, program code stored ina computer readable storage media in a data processing system may bedownloaded over a network from the data processing system to dataprocessing system 200. The data processing system providing program code242 may be a server computer, a client computer, or some other devicecapable of storing and transmitting program code 242.

The different components illustrated for data processing system 200 arenot meant to provide architectural limitations to the manner in whichdifferent embodiments may be implemented. The different illustrativeembodiments may be implemented in a data processing system includingcomponents in addition to, or in place of, those illustrated for dataprocessing system 200. Other components shown in FIG. 2 can be variedfrom the illustrative examples shown. The different embodiments may beimplemented using any hardware device or system capable of executingprogram code. As one example, data processing system 200 may includeorganic components integrated with inorganic components and/or may becomprised entirely of organic components, excluding a human being. Forexample, a storage device may be comprised of an organic semiconductor.

As another example, a computer-readable storage device in dataprocessing system 200 is any hardware apparatus that may store data.Memory 206, persistent storage 208, and computer-readable storage media248 are examples of physical storage devices in a tangible form.

In another example, a bus system may be used to implement communicationsfabric 202 and may be comprised of one or more buses, such as a systembus or an input/output bus. Of course, the bus system may be implementedusing any suitable type of architecture that provides for a transfer ofdata between different components or devices attached to the bus system.Additionally, a communications unit may include one or more devices usedto transmit and receive data, such as a modem or a network adapter.Further, a memory may be, for example, memory 206 or a cache, such as acache found in an interface and memory controller hub that may bepresent in communications fabric 202.

It is understood that although this disclosure includes a detaileddescription of cloud computing, implementation of the teachings recitedherein are not limited to a cloud computing environment. Rather, theillustrative embodiments are capable of being implemented in conjunctionwith any other type of computing environment, now known or laterdeveloped. Cloud computing is a model of service delivery for enablingconvenient, on-demand network access to a shared pool of configurablecomputing resources, such as, for example, networks, network bandwidth,servers, processing, memory, storage, applications, virtual machines, orservices, which can be rapidly provisioned and released with minimalmanagement effort or interaction with a provider of the service. Thiscloud model may include at least five characteristics, at least threeservice models, and at least four deployment models.

The characteristics may include, for example, on-demand self-service,broad network access, resource pooling, rapid elasticity, or measuredservice. On-demand self-service allows a cloud consumer to unilaterallyprovision computing capabilities, such as server time or networkstorage, as needed, automatically without requiring human interactionwith the service's provider. Broad network access provides forcapabilities that are available over a network and accessed throughstandard mechanisms that promote use by heterogeneous thin or thickclient platforms, such as, for example, mobile phones, laptops, orpersonal digital assistants. Resource pooling allows the provider'scomputing resources to be pooled to serve multiple consumers using amulti-tenant model, with different physical and virtual resources,dynamically assigned and reassigned according to demand. There is asense of location independence in that the consumer generally has nocontrol or knowledge over the exact location of the provided resources,but may be able to specify a location at a higher level of abstraction,such as, for example, a country, a state, or a data center. Rapidelasticity provides for capabilities that can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly release to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time. Measured service allows cloudsystems to automatically control and optimize resource usage byleveraging a metering capability at some level of abstractionappropriate to the type of service, such as, for example, storage,processing, bandwidth, or active user accounts. Resource usage can bemonitored, controlled, and reported providing transparency, for both theprovider and consumer, of the utilized service.

Service models may include, for example, Software as a Service (SaaS),Platform as a Service (PaaS), and Infrastructure as a Service (IaaS).Software as a Service (SaaS) is the capability provided to the consumerto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface, such as a web browser (e.g., web-based e-mail).The consumer does not manage or control the underlying cloudinfrastructure, including a network, servers, operating systems,storage, or even individual application capabilities, with the possibleexception of limited, user-specific application configuration settings.Platform as a Service (PaaS) is the capability provided to the consumerto deploy onto the cloud infrastructure, consumer-created or acquired,applications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications, and possiblyapplication hosting environment configurations. Infrastructure as aService (IaaS) is the capability provided to the consumer to provisionprocessing, storage, networks, and other fundamental computingresources, where the consumer is able to deploy and run arbitrarysoftware, which can include operating systems and applications. Theconsumer does not manage or control the underlying cloud infrastructure,but has control over the operating systems, storage, deployedapplications, and possibly limited control of select networkingcomponents, such as, for example, host firewalls.

Deployment models may include, for example, a private cloud, communitycloud, public cloud, and hybrid cloud. A private cloud is a cloudinfrastructure operated solely for an organization. The private cloudmay be managed by the organization or a third party, and may existon-premises or off-premises. A community cloud is a cloud infrastructureshared by several organizations and supports a specific community thathas shared concerns, such as, for example, a mission, securityrequirements, a policy, or compliance considerations. The communitycloud may be managed by the organizations or a third party and may existon-premises or off-premises. A public cloud is a cloud infrastructuremade available to the general public or a large industry group and isowned by an organization selling cloud services. A hybrid cloud is acloud infrastructure composed of two or more clouds, such as, forexample, private, community, or public clouds, which remain as uniqueentities, but are bound together by standardized or proprietarytechnology that enables data and application portability, such as, forexample, cloud bursting for load-balancing between clouds.

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure comprising anetwork of interconnected nodes.

FIG. 3 depicts a schematic diagram illustrating a configuration forprocessing events at remote targets in accordance with an illustrativeembodiment. Configuration 300 may comprise database 302, applicationserver cluster 310, remote target broker 330 and remote targets 340.Database 302 stores TARGET_UID_LOCK table 304 and TARGET_EVENT table306. TARGET_UID_LOCK table 304 may be target uid lock table 245 in FIG.2 or TARGET_UID_LOCK table 410 in FIG. 4. TARGET_EVENT table 306 may betarget event table 243 in FIG. 2 or TARGET_EVENT table 420 in FIG. 4.Application server cluster 310 may have a number of nodes. In FIG. 3,application cluster server 310 comprises node 1 312 and node 2 320. Node1 312 may include event monitor 314 and event processor 316. Eventmonitor 314 may access database 302 via line 313 and event processor 316may access database 302 via line 318. Node 2 320 may include eventprocessor 322 and event monitor 324. Event monitor 324 may accessdatabase 302 via line 323 and event processor 322 may access database302 via line 321.

In an illustrative embodiment, remote target broker 330 may be acomponent responsible for processing a number of account requests andperforming an actual update on a remote target, such as may be includedin remote targets 340. An account request may be transmitted to remotetarget broker 330 from node 1 312 by event processor 316 along line 317.Further account requests may be transmitted to remote target broker 330from node 2 320 by event processor 322 along line 325.

An event monitor, such as event monitor 314 and event monitor 324, maybe a single-threaded event monitor responsible for picking up a group ofevents from an event queue and distributing the group of events forprocessing by an event processor, such as event processor 316 and eventprocessor 322.

FIG. 4 depicts a schematic diagram illustrating a configuration forimplementing an event queue in accordance with an illustrativeembodiment. Tables 400 comprise TARGET_UID_LOCK table 410 andTARGET_EVENT table 420. TARGET_UID_LOCK table 410 may include items 414such as LAST_EVENT_ID, TARGET_ID, USER_ID, PROCESSING_NODE, andLOCKED_TIME. TARGET_UID_LOCK table 410 may be TARGET_UID_LOCK table 304of FIG. 3.

In an illustrative embodiment, an event queue may be implemented using arelational table such as TARGET_EVENT table 420. In TARGET_EVENT table420, all events are ordered by increasing EVENT_ID value. EVENT_IDcolumn 422 of TARGET_EVENT table 420 may include items 424, such asUSER_ID, OPERATION USER ID, TARGET_ID, STATUS, CREATED PICKUP_TIME,SERVER_ID, and a number of attributes such as ATTR1 and ATTR2.TARGET_EVENT table 420 may be TARGET_EVENT table 306 in FIG. 3. Twospecial columns (not shown) may be present in TARGET_EVENT table. First,PICKUP_TIME TIMESTAMP may contain times when an event was picked up byan event monitor, such event monitor 314 and event monitor 324 in FIG.3. Second, SERVER_ID VARCHAR may contain an identifier of the nodemember which picked up the event.

FIG. 5 depicts a flowchart illustrating a process for picking up eventsfrom a TARGET_EVENT table in accordance with an illustrative embodiment.In the illustrative embodiment, processing sequence 500 picks up eventsfrom a TARGET_EVENT table using a SELECT FOR UPDATE statement (Step502). The TARGET_EVENT table may be a table, such as TARGET_EVENT table306 in FIG. 3 or TARGET_EVENT table 420 in FIG. 4. Selected events arereserved for processing by the cluster node which triggered the query(Step 504). PICKUP_TIME and SERVER_ID values are inserted for eachpicked up event (Step 506). The selected events are grouped by targetand UID preserving their relative order in the overall event sequence(Step 508). Each group of events created in Step 508 is submitted forprocessing (Step 510).

FIG. 6 depicts a flowchart illustrating a reset process in accordancewith an illustrative embodiment. All steps in FIG. 5 are performedwithin a single database transaction (Step 602). A determination is madeas to whether any step has failed (Step 604). If a step has failed, allevents picked up within the single database transaction are reset totheir original state so that they may be picked up again by any node atthe next interval (Step 606). The reset events are picked up by anycurrently available node (Step 608). If no steps failed at Step 604, theprocess progresses to Step 610. A determination is made whether anotheriteration is necessary to process groups of the remaining events pickedup on this node (Step 610). If there is another iteration, process 600goes to Step 602. If not, process 600 ends.

FIG. 7 depicts a flowchart illustrating a processing sequence of anevent processor in accordance with an illustrative embodiment. In anillustrative embodiment, an event processor, such as event processor 316or event processor 322 in FIG. 3, may be a multi-threaded eventprocessor responsible for processing the events delivered to it from theevent monitor by sending requests to the remote target.

Processing sequence 700 receives a group of events delivered to theevent processor (Step 702). The event processor converts the event datainto requests suitable for sending to the remote target request broker(Step 704). For example, in the case of an account create event, accounttemplates may be queried and any applicable or required attributes areappended to the request. The event processor iterates over each event insequence, starting with the earliest one in the group, and sends acorresponding request to the remote target request broker. Thus, process700 selects an earliest event in a group (Step 706). A correspondingrequest is sent to the remote target broker (Step 708). The remotetarget request broker process is depicted in FIG. 8. Event status isupdated appropriately in the TARGET_EVENT table depending on the outcomeof the remote processing by the remote target broker (RTB) (Step 710). Adetermination is made as to whether there is another request (Step 712).If there is another request, process 700 returns to Step 706. If not,process 700 ends.

FIG. 8 depicts a flowchart illustrating a process for a remote targetprocessor to process a request in accordance with an illustrativeembodiment. A remote target broker receives a request (Step 802). Therequest is processed (Step 804). A determination is made as to whetherprocessing is complete (Step 806). If processing is complete, the eventstatus in the TARGET_EVENT table is updated (Step 808). If processing isnot complete, the process returns to Step 804. A determination is madeas to whether there is another request (Step 810). If there is anotherrequest process 800 goes to step 804. If not, process 800 ends.

FIG. 9 depicts a flowchart illustrating a process for event locking inaccordance with an illustrative embodiment. In an illustrativeembodiment, event locking may be done at the unique target-UID level.New TARGET_UID_LOCK table may be TARGET_UID_LOCK tables 245, 304, and410 shown in FIGS. 2, 3 and 4, respectively. Before sending the group ofpicked up events to the event processor, event monitor will accessTARGET_UID_LOCK table (Step 902). Next, a row is added to theTARGET_UID_LOCK table (Step 904). A target is specified (Step 906). Aprocessing node is specified (Step 908). A user identification (UID) isspecified (Step 910). A locked time is specified (Step 912). The ID ofthe first event in sequence for the group of events is specified (Step914). This will effectively lock the UID on a specific target for theduration of time required to process the event group on one node of thecluster. The group of picked up events is sent to the event processor(Step 916). A determination is made whether there is another group (Step918). If there is another group, process 900 returns to Step 902. Ifnot, process 900 ends.

FIG. 10 depicts a flowchart illustrating an event retry sequence inaccordance with an illustrative embodiment. An event processor maydetect a server failure with a status interpreted as a temporaryfailure. Process 1000 determines whether a group of events has beenreceived (Step 1002). If not, the process begins again. If at Step 1002,a group of events is received, process 1000 checks whether the locktable already contains an entry for another group of events on the sametarget and UID (Step 1004). A determination is made as to whether a lockrow ID exists (Step 1006). If a lock row ID exists, the event processorwill release the received events so that they may be picked up again atthe next pickup interval possibly by another node (Step 1008). This steprepeats until the event monitor on one of the nodes picks up a group ofevents for a UID and that the UID is not locked. Thus, when adetermination is made at step 1006 that no lock row ID exists, theprocess makes a determination as to whether all pending events on agiven target and UID have been processed (Step 1014). If all pendingevents have not been processed, the process returns to Step 1002. Whenan event processor on any node detects that all pending events on thegiven target and UID have been processed, process 1000 removes thecorresponding lock row from TARGET_UID_LOCK table (Step 1016). Process1000 ends.

FIG. 11 depicts a flowchart illustrating a process for dealing with anevent processing node that goes down in accordance with an illustrativeembodiment. A determination is made as to whether an event processingnode has gone down in the middle of processing (Step 1102). If not, theprocess terminates. If the event processing node goes down in the middleof processing, other nodes will wait a maximum predetermined amount oftime (Step 1104). The maximum predetermined amount of time may bemaxRetryDuration and is the time before one of the processing nodes willfail the remaining events in the group and remove the lock. In this way,the processing of new events on that UID may resume on another node. Adetermination is made as to whether the time has expired (Step 1106). Ifthe time has not expired, a determination is made whether the node whichwent down is brought up again within the maxRetryDuration (Step 1108).If the node has not been brought back up, the process returns to Step1106. If the node has been brought back up, a determination is made ifthe group still owns the lock given on the UID (Step 1110). If the groupstill owns the lock on the UID, processing resumes (Step 1112) and theprocess returns to Step 1102. If not, the process goes to Step 1106.Returning now to Step 1106, if the time has expired, process 1100 failsthe remaining events in a group of events (Step 1114). The lock on thegroup of events is removed (Step 1116). Processing of the group ofevents on another node is resumed (Step 1118). Process 1100 ends.

Every time an event is successfully processed, the LAST_EVENT_ID isupdated in the TARGET_UID_LOCK table. This way, if any other node needsto pick up the processing, it will have way to check if it needs to waitfor an earlier sequence of events to be processed first.

FIG. 12 depicts a flowchart illustrating a retry process in accordancewith an illustrative embodiment. There are three basic types of errorsthat may occur when processing access request events once the event hasbeen successfully delivered to the event processor. First, a messagewith events may not be picked up, because the messaging component or aserver instance has gone down for maintenance, for example. Second, if aremote target broker is down or a remote target is down or for any othertemporary reason, the request cannot be processed remotely. Third, theremote target broker cannot and will not process the request, forexample, a bad request or target has been taken down (deleted)permanently. The first error may result in an unprocessed event holdingup other subsequent events affecting the same account UID. The systemmay decide to invalidate all events, which have not been processed for apredetermined duration of time. The second error should always result inretried event processing up to maxRetryDuration. The third error shouldresult in permanent failure, which should be reflected in the eventstatus being updated accordingly in the TARGET_EVENT table. Thiscondition may also result in failing of subsequent dependent events onanother node, which now have no chance of succeeding.

Thus, process 1200 determines whether a message with events has not beenpicked up (Step 1202). If this is true, a determination is made whetherall events should be invalidated (Step 1204). If all events should beinvalidated, all events which have not been processed for apredetermined time are invalidated (Step 1206). If all events are not tobe invalidated, or if at Step 1202 a message with events was picked up,process 1200 goes to Step 1208. A determination is made whether thereason a request cannot be processed is temporary (Step 1208). If thereason is temporary, a retry sequence is executed (Step 1210) and theprocess goes to step 1212. If the reason is not temporary, the processproceeds to Step 1212. A determination is made whether a remote targetbroker will not process the request (Step 1212). If a remote targetbroker will not process the request, a permanent failure is made astatus update in TARGET_EVENT table (Step 1214). If not, the processterminates.

FIG. 13 depicts a flowchart illustrating an event retry process inaccordance with an illustrative embodiment. An event retry sequence suchas process 1300 is activated (Step 1302) when an event processor detectsan interactive broker (TB) server failure with a status interpreted as atemporary failure. Event processor resets the events in TARGET_EVENTtable by clearing values for PICKUP_TIME and SERVER_ID columns (Step1304). A determination is made whether the event monitor has picked upthe reset events and submitted them for processing again (Step 1306). Ifnot, the process goes to Step 1304. If the event monitor has picked upthe reset events and submitted them for processing again, the eventprocessor checks the LOCKED_TIME value in TARGET_UID_LOCK table (Step1308). Based on a predetermined maxRetryDuration value, a determinationis made whether a maximum time has been met or exceeded (Step 1310). Ifat Step 1310 NOW( )-PICKUP_TIME is less than maxRetryDuration, the resetevents are retried (step 1314). If at Step 1310 NOW( )-PICKUP_TIME isgreater than maxRetryDuration, then the process fails permanently (step1312). The default constant idleTime interval value is configurable withdefault set to 60 seconds.

Therefore, using the above technique, if the value of maxRetryDurationis 10 minutes, the event could potentially be reset up to 9 times:(maxRetryDuration*60/idleTime)−1.The retry technique may utilize a constant or a gradually increasingtime delay, which is configurable. The constant delay may be equal tothe idleTime value as shown above.

To avoid too frequent or too seldom retries, the configurable values ofidleTime and maxRetryDuration may be adjusted. Arbitrarily, a customretryDelay interval could be introduced after each non-permanent failureand before the event is reset and retried. In such case, the event wouldbe scheduled for reset after an ever increasing the time intervalinitially equal to retryDelay parameter. During each subsequent retryattempt, a fixed amount of time equal to retryDelay value is added tothe previously used delay value.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiment. The terminology used herein was chosen to best explain theprinciples of the embodiment, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed here.

The flowcharts and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowcharts or block diagrams may represent a module, a segment, or aportion of code, which comprises one or more executable instructions forimplementing the specified logical function or functions. It should alsobe noted that, in some alternative implementations, the functions notedin the block may occur out of the order noted in the figures. Forexample, two blocks shown in succession may, in fact, be executedsubstantially concurrently, or the blocks may sometimes be executed inthe reverse order, depending upon the functionality involved. It willalso be noted that each block of the block diagrams and/or flowchartillustrations, and combinations of blocks in the block diagrams and/orflowchart illustrations, can be implemented by special purposehardware-based systems that perform the specified functions or acts, orcombinations of special purpose hardware and computer instructions.

What is claimed is:
 1. A computer implemented cluster aware target useridentification (target-UID) locking method comprising: obtaining, by theprocessor, information from a target UID lock table, wherein the targetUID lock table includes a lock row including a target, a clusterprocessing node associated with the target, a user identification (UID)associated with the target, a lock time associated with the UID, and anidentification of a beginning event in an event group of events from atarget event table; reserving the events in the event group forprocessing by the cluster processing node which triggers a query;inserting, by the processor, pickup time values and server ID values foreach of the events, wherein the pickup time values contain timestampswhen a given event was picked up by the processor, and the server IDvalues identify a given cluster processing node of a cluster whichpicked up the event; grouping, by the processor, the events by thetarget and the UID while preserving a relative order in an overall eventsequence; submitting, by the processor, the event group to the clusterfor processing by particular cluster processing nodes of the cluster inaccordance with the server ID values for each of the events; locking theUID on the target for the lock time; and processing the beginning eventduring the lock time, wherein the processing of the beginning event isperformed by the cluster processing node.
 2. The computer implementedmethod of claim 1, further comprising: obtaining additional informationfrom the target UID lock table, wherein the additional informationincludes another lock row including the target, another UID, and anotherbeginning event for another event group.
 3. The computer implementedmethod of claim 2, further comprising: locking the another UID.
 4. Thecomputer implemented method of claim 3, further comprising: processingthe another beginning event, wherein the processing of the anotherbeginning event is performed by another cluster processing node of thecluster; and processing additional events from the event group duringthe lock time, wherein the processing of the additional events isperformed by the cluster processing node.
 5. The computer implementedmethod of claim 4, further comprising: responsive to the processing nodegoing down while processing one of the events in the event group,failing any remaining events in the event group.
 6. The computerimplemented method of claim 4, further comprising: responsive to one ofthe events in the event group successfully processing, updating aLAST_EVENT-ID in the table.
 7. The computer implemented of claim 4,further comprising; responsive to all of the events in the group ofevents being processed, removing the lock row from the table, such thatthe processing node is available to process other events.
 8. A computersystem comprising: a processor connected to a database, an applicationserver cluster, a remote account request target broker, and a number ofremote targets, the database and the application server cluster storinginstructions configured to cause the processor to perform stepscomprising: obtaining, by the processor, information from a target UIDlock table, wherein the target UID lock table includes a lock rowincluding a target, a cluster processing node associated with thetarget, a userid (UID) associated with the target, a lock timeassociated with the UID, and an identification of a beginning event inan event group of events from a target event table; reserving the eventsin the event group for processing by the cluster processing node whichtriggered a query; inserting, by the processor, pickup time values andserver ID values for each of the events, wherein the pickup time valuescontain timestamps when a given event was picked up by the processor,and the server ID values identify a given cluster processing node of acluster which picked up the event; grouping, by the processor, theevents by the target and the UID while preserving a relative order in anoverall event sequence; submitting, by the processor, the event group tothe cluster for processing by particular cluster processing nodes of thecluster in accordance with the server ID values for each of the events;locking the UID on the target for the lock time; processing thebeginning event during the lock time, wherein the processing of thebeginning event is performed by the cluster processing node.
 9. Thecomputer system of claim 8, wherein the database and the applicationserver cluster store further instructions configured to cause theprocess to perform steps comprising: obtaining additional informationfrom the target UID lock table, wherein the additional informationincludes another lock row including the target, another UID, and anotherbeginning event for another event group.
 10. The computer system ofclaim 9, wherein the database and the application server cluster storefurther instructions configured to cause the process to perform stepscomprising: locking the another UID.
 11. The computer system of claim10, wherein the database and the application server cluster storefurther instructions configured to cause the process to perform stepscomprising: processing the another beginning event, wherein theprocessing of the another beginning event is performed by anothercluster processing node of the cluster; and processing additional eventsfrom the event group during the lock time, wherein the processing of theadditional events is performed by the cluster processing node.
 12. Thecomputer system of claim 11, wherein the database and the applicationserver cluster store further instructions configured to cause theprocess to perform steps comprising: responsive to the processing nodegoing down while processing one of the events in the event group,failing any remaining events in the event group.
 13. The computer systemof claim 11, wherein the database and the application server clusterstore further instructions configured to cause the process to performsteps comprising: responsive to one of the events in the event groupsuccessfully processing, updating a LAST_EVENT-ID in the table.
 14. Acomputer program product for dynamically injecting a wait function intoa program, the computer program product comprising a computer-readablestorage medium having program instructions executable by a computer tocause the computer to perform a method comprising: obtaining, by theprocessor, information from a target UID lock table, wherein the targetUID lock table includes a lock row including a target, a clusterprocessing node associated with the target, a user identification (UID)associated with the target, a lock time associated with the UID, and anidentification of a beginning event in an event group of events from atarget event table; reserving the events in the event group forprocessing by the cluster processing node which triggered a query;inserting, by the processor, pickup time values and server ID values foreach of the events in the event group, wherein the pickup time valuescontain timestamps when a given event was picked up by the processor,and the server ID values identify a given cluster processing node of acluster which picked up the event; grouping, by the processor, theevents by the target and the UID while preserving a relative order in anoverall event sequence; submitting, by the processor, the event group tothe cluster for processing by particular cluster processing nodes of thecluster in accordance with the server ID values for each of the events;locking the UID on the target for the lock time; processing thebeginning event during the lock time, wherein the processing of thebeginning event is performed by the cluster processing node.
 15. Thecomputer program product of claim 14, wherein the program instructionsfurther comprise: obtaining additional information from the target UIDlock table, wherein the additional information includes another lock rowincluding the target, another UID, and another beginning event foranother event group.
 16. The computer program product of claim 15,wherein the program instructions further comprise: locking the anotherUID.
 17. The computer program product of claim 16, wherein the programinstructions further comprise: processing the another beginning event,wherein the processing of the another beginning event is performed byanother cluster processing node of the cluster; and processingadditional events from the event group during the lock time, wherein theprocessing of the additional events is performed by the clusterprocessing node.
 18. The computer program product of claim 16, whereinthe program instructions further comprise: responsive to the processingnode going down while processing one of the events in the event group,failing any remaining events in the event group.
 19. The computerprogram product of claim 16, wherein the program instructions furthercomprise: responsive to all of the events in the group of events beingprocessed, removing the lock row from the table such that the processingnode is available to process other events.
 20. The computer programproduct of claim 16, wherein the program instructions further comprise:responsive to one of the events in the event group successfullyprocessing, updating a LAST_EVENT-ID in the table.